package com.ukao.cashregister.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.mcxtzhang.commonadapter.rv.CommonAdapter;
import com.mcxtzhang.commonadapter.rv.ViewHolder;
import com.ukao.cashregister.R;
import com.ukao.cashregister.bean.ClothginQuiryBean;
import com.ukao.cashregister.utils.CheckUtils;
import com.ukao.cashregister.utils.ImageUtils;

import java.util.List;

/**
 * Created by ukaodev on 2017/6/14.
 */

public class ClothingDetailstImageAdapter extends CommonAdapter<ClothginQuiryBean.RoductImgBean> {



    public ClothingDetailstImageAdapter(Context context, List<ClothginQuiryBean.RoductImgBean> datas ) {
        super(context, datas, R.layout.adapter_clothing_detailst_image);
    }




    @Override
    public void convert(ViewHolder holder, ClothginQuiryBean.RoductImgBean item) {
        ImageView   mImageView=holder.getView(R.id.image);
        ImageUtils.setViewWithoter(mContext,mImageView, 130,5);
        ImageUtils.loadImage(mContext,item.getCameraImg(),mImageView);
        Glide.with(mContext)
                .load(item.getCameraImg())
                .crossFade()
                .into(mImageView);
    }


}
